home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / utility2 / winck30n.zip / DDE.TX$ < prev    next >
Text File  |  1991-12-10  |  20KB  |  591 lines

  1.           
  2.           WinCheck 3.0  DDE Tech Notes
  3. Version 3.0h  10/24/91  ⌐ 1991 Wilson WindowWare, Inc
  4.  
  5. This document is separated into three sections:
  6.  
  7.   DDE Commands to Request WinCheck Information
  8.   DDE Commands to Enter or Change WinCheck information
  9.   The WinCheck DDE SDK
  10.  
  11.  
  12.           
  13.           DDE Commands to Request WinCheck Information
  14.           ============================================
  15.           
  16. These commands are sent to WinCheck with the DDE Request convention.
  17.  
  18. GETEARLIESTUNCLEARED
  19.  
  20.   Description:
  21.   GETEARLIESTUNCLEARED will place the following ASCII string into
  22.   your return area:
  23.       M:mm,Y:yy
  24.  
  25. GETREG
  26. GETREGLITE
  27.  
  28.   Description:
  29.   GETREG and GETREGLITE will get the information from a WinCheck 
  30.   Register, and place it into a tabbed ASCII file. GETREG returns 
  31.   all information about each transaction (payee, amount, category/split
  32.   information, memo information, address, and tax/cleared status).
  33.   GETREGLITE does not return category information, memo lines, or
  34.   addresses.  GETREGLITE is substantially faster than GETREG.
  35.   Certain filters can also be applied:
  36.   
  37.      M=mm                  Specify Month.
  38.      Y=yy                  Specify Year
  39.      F=All                 Show all (no filter, default)
  40.      F=Cleared             Show Cleared
  41.      F=Uncleared           Show Uncleared
  42.      F=Credit              Show Credit
  43.      F=Debit               Show Debit
  44.  
  45.   Example Usage's in Word for Windows:
  46.   
  47.   To get the entire register for the current month in WinCheck, Account TUT:
  48.       {dde WinCheck TUT GetReg}
  49.       
  50.   To get the May 91 Register without memos or categories:
  51.       {dde WinCheck TUT GetRegLite,m=05,y=91}
  52.       
  53.   To get the May 91 Register, cleared transactions only:
  54.       {dde WinCheck TUT GetReg,m=05,y=91,f=cleared}
  55.       
  56.   To get the May 91 Register, cleared debits only:
  57.       {dde WinCheck TUT GetReg,m=05,y=91,f=cleared,f=debit}
  58.   
  59.   Format of Output
  60.   The output from GETREG will be a tabbed ASCII file.  Each tab 
  61.   represents a column.  Each transaction will have 16 columns. If
  62.   the transaction is split amongst categories, then each split will 
  63.   be displayed on subsequent lines. GETREGLITE does not use columns 8-16.
  64.   
  65.   Column    Description                      Example
  66.  
  67.   1         Account ID                       TUT
  68.   2         Unique Record                    12
  69.             Number for that month
  70.   3         Transaction Type                 300
  71.             (see Table at end)
  72.   4         Date                             03/10/91
  73.   5         Check # (if any).                203
  74.             Blank if not a check
  75.   6         Payee/Description                Safeway
  76.   7         Transaction amount.              -67.73
  77.             Debits will have a
  78.             negative sign.
  79.   8         Category/Subcategory.             Personal:Food
  80.             SPLIT if split.
  81.   9         Tax significant.                  T
  82.             A "T" indicates tax
  83.             significance, a blank
  84.             indicates otherwise.
  85.   10        Transaction Cleared status        C
  86.             A "C" indicates the
  87.             transaction is cleared, a
  88.             blank indicates otherwise.
  89.   11        "To" line in Address              Seafirst Bank Co         
  90.   12        Address                           123 Main Street
  91.   13        City, State                       Seattle, WA
  92.   14        Zip code                          98000
  93.   15        Memo 1                            Groceries
  94.   16        Memo 2                            Party food
  95.   
  96.   The subsequent lines for a split transaction have the following format:
  97.   
  98.   Column    Description                     Example
  99.   
  100.   1         Split Number. Always in         #1
  101.             numerical order with a 
  102.             pound sign.
  103.   2         Split amount                    -23.43
  104.   3         Category/Subcategory            Personal:Hobbies
  105.             
  106.   
  107.   Example Output
  108.   
  109.  TUT0 100 03/04/91        Checking Deposit   2783.93 Royalty   T  C
  110.  TUT1 300 03/05/91  3336  George Kilroy        -9.50 Personal:Newspaper T
  111.  TUT2 300 03/05/91  3337  Seattle City Light -187.45 Utilities T  C
  112.  TUT3 300 03/05/91  3338  U.S. West           -65.47 SPLIT     T #1 -35.34 
  113.  Utilities:Home Phone #2 -30.13 Utilities:Celluar Phone
  114.  TUT4 300 03/05/91  3339  Cellular One       -114.68 Utilities T
  115.  
  116.  
  117. GETCATEGORIES
  118. GETCATEGORIESSORTED
  119.  
  120.   Description:
  121.   GETCATEGORIES and GETCATEGORIESSORTED will get the list of categories
  122.   and subcategories from WinCheck, and place it into an ASCII file.  
  123.   GETCATEGORIES is significantly faster than GETCATEGORIESSORTED.
  124.   
  125.   Example Usage in WinWord
  126.     {dde WinCheck TUT GetCategories}
  127.     {dde WinCheck TUT GetCategoriesSorted}
  128.  
  129.   Format of Output
  130.   There is one category per line.
  131.   
  132.   Example Output (sorted)
  133.    Band Income
  134.    Car Pymt
  135.    Computer
  136.    Credit Cards
  137.    Credit Cards:Gas
  138.    Garden Svc
  139.    Model Fees
  140.    Mortgage
  141.    Personal
  142.    Personal:Food
  143.    Personal:Hobbies
  144.    Personal:Magazines
  145.    Personal:Newspaper
  146.    Royalty
  147.    Utilities
  148.    Utilities:Celluar Phone
  149.    Utilities:Home Phone
  150.  
  151. GETCURDATE
  152.   Description:
  153.   GETCURDATE will return the current date.
  154.   
  155. GETCHECKING
  156. GETSAVINGS
  157. GETBNKCHECKING
  158. GETBNKSAVINGS
  159.   
  160.   Description:
  161.   These four commands will return the current balance for checking and
  162.   savings accounts, for either Your balance or the Bank's balance.
  163.   
  164. GETCOMMON
  165.  
  166.   Description:
  167.   GETCOMMON will get a list of the common transactions defined in WinCheck.
  168.   Certain filters can also be applied:
  169.   
  170.      R=All          Show all Dates Common (default)
  171.      R=ll-hh        Show Commons between ll and hh days
  172.      F=All          Show both cleared and uncleared
  173.      F=Cleared      Show Cleared
  174.      F=Uncleared    Show Uncleared
  175.   
  176.   Example Fields in Word for Windows
  177.   ==================================
  178.   To get all of the Common Transactions:
  179.       {dde WinCheck TUT GetCommon}
  180.   
  181.   To get all of the Common Transactions that are debits:
  182.       {dde WinCheck TUT GetCommon,f=debit}
  183.   
  184.   To get all of the Common Transactions that happen from the 1st to the
  185.   15th of the month:
  186.       {dde WinCheck TUT GetCommon,r=1-15}
  187.   
  188.   Gets all Common Transactions that happen from the 1st to the 15th
  189.   of the month, and credit the account:
  190.       {dde WinCheck TUT GetCommon,r=1-15,f=credit}
  191.      
  192.   Format of Output
  193.   
  194.    There is one common transaction per line.  Each tab represents a
  195.    column. There are four columns:
  196.    
  197.    Column    Description                    Example
  198.  
  199.    1         Transaction Properties         MP,R
  200.    2         Day of month                   04
  201.    3         Payee                          Seattle City Light
  202.    4         Amount                         -9.50
  203.    
  204.   
  205.   Example Output
  206.   
  207.    A       03      Checking Deposit             +2783.93
  208.    MP      04      George Kilroy                   -9.50
  209.    M       08      Seattle City Light              -0.00
  210.    M       08      U.S. West Communications        -0.00
  211.    M       08      Cellular One                    -0.00
  212.    MPP,R   08      Wells Fargo Mortgage Co       -2245.85
  213.    M       08      Smith Lawn and Garden Care     -145.56
  214.    M       11      Checking Deposit              +3100.00
  215.  
  216.   
  217.           
  218.           DDE Commands to Enter or Change WinCheck Information
  219.           ====================================================
  220.   
  221. These commands are sent to WinCheck with the DDE Execute convention.
  222. If the last two characters ar NR (i.e. WRITECHECKNR), this will
  223. supress a register recalc.  If you are going to add a bunch of
  224. transactions at the same time, use the NR command, and then
  225. use the RECALC command... this will increase speed dramatically.
  226.  
  227. WRITECHECK
  228. WRITECHECKNR
  229.  
  230.   Description:
  231.   WRITECHECK will enter a check into WinCheck's register. There are a 
  232.   number or parameters that can be filled in:
  233.   
  234.    Syntax          Description               Example
  235.    
  236.    D=mm/dd/yy      Specify Date              D=03/09/91
  237.    T=dddd.cc       Specify Amt               T=45.84
  238.    C=X             Specify Cleared           C=Y
  239.    N=###           Specify check number      N=2342
  240.    P="ppppppp"     Specify Payee             P="Seattle City Light"
  241.    M="mmmmm"       Specify Memo1             M="Groceries"
  242.    M2="mmmmm"      Specify Memo2             M2="Party Food"
  243.    L="ccccc:ssss"  Specify Category          L="Personal:Groceries"
  244.    $T=n*ddd.cc     Specify Split #n amount   $T=1*34.56
  245.                    (max 32)
  246.    $L=n*"ddd.cc"   Specify Split #n category $L=1*"Utilities:Home Phone"
  247.                    (max 32)
  248.    TO="ttt"        "To" part of Address      TO="Seattle City Light"
  249.    ADDR="sss"      Street Address            ADDR="123 Main Street"
  250.    CITY="ccc"      City                      CITY="Seattle"
  251.    STATE=ss        State                     STATE=WA
  252.    ZIP=zzzz        Zip                       ZIP=98004
  253.    PRINT           Prints this check         PRINT
  254.                   
  255.   
  256.   Examples
  257.   
  258.   To make WinCheck write a check for 580.00 to Shorewood Apartments,
  259.   category Rent, using the current date, and the current check #:
  260.   
  261.       [WriteCheck:p="Shorewood
  262.       Apartments",t=580.00,l="Rent"]
  263.  
  264.   To make WinCheck write a check for 580.00 to Shorewood Apartments,
  265.   category Rent, using the current date, and current check #, and print it:
  266.   
  267.       [WriteCheck:p="Shorewood
  268.       Apartments",t=580.00,l=Rent,print]
  269.   
  270.   To make WinCheck write a check to US West for 65.47, split two ways,
  271.   35.34 for Home Phone, and 30.13 for the cellular phone (the line 
  272.   breaks are for cosmetic reasons only):
  273.   
  274.       [WriteCheck:p="US West",T=65.47,
  275.       $T=1*35.34,$L=1*"Utilities:Home Phone",
  276.       $T=2*30.13,$L=2*"Utilities:Cellular Phone"]
  277.  
  278. CDEPOSIT
  279. SDEPOSIT
  280. CDEPOSITNR
  281. SDEPOSITNR
  282.  
  283.   Description:
  284.   CDEPOSIT and SDEPOSIT are used the same way as WRITECHECK. CDEPOSIT 
  285.   will make a checking deposit, and SDEPOSIT will make a savings deposit.
  286.   
  287.   Examples
  288.   To make WinCheck make a deposit for 1000, split across "Band Income" 
  289.   and "Payroll", on May 15, 1991:
  290.   
  291.       [CDeposit:t=1000.00,
  292.       $T=1*450.00,$L=1*"Band Income",
  293.       $T=2*550.00,$L=2*"Payroll",D=05/15/91]
  294.  
  295. CMISC
  296. SMISC
  297. CMISCNR
  298. SMISCNR
  299.  
  300.   Description:
  301.   CMISC and SMISC allow you to make up your own transaction. Use the
  302.   same parameters as WRITECHECK, but add the following:
  303.   
  304.    Syntax         Description                  Example
  305.    
  306.    DESC="ddd"     Specify Description          DESC="Service Fees"
  307.    T=dddd.cc      Specify Amt                  T=45.84
  308.    CR             Specify this transaction     CR
  309.                   credits your account
  310.   
  311.   Examples
  312.   To make WinCheck enter Service Fees for 6.50 on June 12, 1991.
  313.       [CMisc:t=6.50,Desc="Service Fees",D=06/12/91]
  314.  
  315. ADD
  316. ADDNR
  317.  
  318.   Description:
  319.   ADD and ADDNR allow you to make up your own transaction. Use the
  320.   same parameters as CMISC, but add the following:
  321.   
  322.    Syntax         Description                  Example
  323.    
  324.    Y=n            Specify Type (from Table     Y=303
  325.                   at end of this doc,
  326.  
  327.    T=dddd.cc      Specify Amt                  T=45.84
  328.    R=y|n          Specify Credit               R=Y
  329.   
  330.   Examples
  331.   To make WinCheck enter 10.00 of interest to Savings on June 12, 1991.
  332.       [ADD:t=10.00,Desc="Savings Interest",D=06/12/91,Y=303,R=Y]
  333.  
  334. MODIFY
  335. MODIFYNR
  336.  
  337.   Description:
  338.   MODIFY and MODIFYNR can be used to change certain properties about a
  339.   transaction. These properties are:
  340.   
  341.      Transaction Amount
  342.      Cleared/Uncleared Status
  343.      Payee
  344.      Check Number
  345.   
  346.   MODIFYNR will not cause a screen refresh or recalc afterwards. This is 
  347.   helpful if you are modifying a large group of transactions at once 
  348.   because the refresh is a slow process. You should use the RECALC command
  349.   (explained elsewhere in this text).
  350.   
  351.   In order to modify a transaction, you must have the month, year, 
  352.   and the unique record number of the transaction. The GETREG or 
  353.   GETREGLITE functions can give you this information.
  354.   
  355.   When modifying a transaction, specify the date and the record number
  356.   with the following parameters:
  357.   
  358.    Syntax         Description               Example
  359.    
  360.    D=mm/dd/yy     Specify Description       D=03/12/91
  361.                  
  362.    R=nn           Specify number            R=7
  363.   
  364.   Example
  365.   Consider the following output from GETREGLITE:
  366.   
  367.   TUT0   100        03/04/91           Checking  Deposit   2783.93   C
  368.   TUT1   300        03/05/91    3336   George Kilroy         -9.50
  369.   TUT2   300        03/05/91    3337   Seattle City Light  -187.45
  370.   TUT3   300        03/05/91    3338   U.S. West            -65.47
  371.   TUT4   300        03/05/91    3339   Cellular One        -114.68
  372.   TUT5   300        03/05/91    3340   Wells Fargo Co     -2245.85
  373.   
  374.   If we want to clear the check to Seattle City Light (Unique Number 2),
  375.   we would use the following command (notice how only the month and year
  376.   need to be correct):
  377.   
  378.       [Modify:d=03/01/91,r=2,C=Y]
  379.   
  380.   Important:  If you change the amount of a transaction which is split,
  381.   the category will be set back to "Personal".
  382.  
  383. RECALC
  384.   
  385.   Description:
  386.   RECALC will cause a screen refresh and recalculation of WinCheck's
  387.   data from a specified date.
  388.   
  389.   Example
  390.   This command will recalc/refresh all data that is greater than or
  391.   equal to March 1, 1991:
  392.   
  393.       [Recalc:D=03/01/91]
  394.   
  395.   
  396. REGISTERADDON
  397.   
  398.   Description:
  399.   A third party add-on tool can add itself to WinCheck's  Menu by using
  400.   the REGISTERADDON command.  The following parameters are used:
  401.   
  402.    Syntax         Description          Example
  403.    E="eee"        Executable Name      E="PAYROLL.EXE"
  404.                   
  405.    D="ddd"        Menu Descriptor      D="Payroll Deposit..."
  406.                   
  407.    S="sss"        Status Line Text     S="Make a Payroll Deposit"
  408.                             
  409.    C="ccc"        Caption of your app  C="Payroll Deposit"
  410.                   
  411.   
  412.   Example
  413.   To register the Payroll Deposit Application that is supplied with 
  414.   WinCheck, Payroll issues the following command:
  415.   
  416.   [REGISTERADDON:E="PAYROLL.EXE",D="Payroll Deposit...",
  417.       S="Make a Payroll Desposit",C="Payrol Deposit"]
  418.   
  419.   Please see the section on the DDE SDK for the guidelines
  420.   for WinCheck add-on tools.
  421.   
  422.   
  423.           
  424.           The WinCheck DDE SDK
  425.           ====================
  426.   
  427.   This section is divided into 7 different chapters:
  428.   
  429.     What is an Add-On Tool?
  430.     What is Registering?
  431.     Command line parameters
  432.     WWWDDEC.DLL
  433.     Using Visual Basic to write your tool
  434.     Using the Windows SDK to write your tool
  435.     Distributing your tool to the masses
  436.   
  437. What is an Add-On Tool?
  438. =======================  
  439.   WinCheck Add-On tools are separate programs that use DDE to manipulate
  440.   or examine WinCheck data.  WinCheck can add these programs to its menu
  441.   to shield the End User of the fact that they are really running a 
  442.   separate program. The End User will think that your add-on tool is just
  443.   a built-in part of WinCheck.
  444.   
  445. What is Registering?
  446. ====================  
  447.   Registering an app with WinCheck informs WinCheck of what to put on
  448.   its menu, status line, and where the Add-On tool exists on the End 
  449.   User's machine.
  450.   
  451.   When an End User first receives your tool, they will need to add it
  452.   with the "Add..." menu choice in WinCheck's "Tools" menu. When they do
  453.   this, WinCheck will execute your add-on tool, with the /R:xxx switch 
  454.   (see next chapter).  Your application then must use the REGISTERADDON
  455.   execute command to acknowledge WinCheck's attempt to add on the tool.
  456.   
  457.   Once your application has registered itself, there is no need to 
  458.   register itself again.
  459.   
  460. Command line parameters
  461. =======================
  462.   
  463.   There are three types of interaction WinCheck has with your tool, two
  464.   involve executing it:
  465.   
  466.   1. The End User adds it with the "Add..." menu option. WinCheck will 
  467.      then run your application with the /R:xxx command line switch. 
  468.      "xxx" is the current account ID, which is used for the topic in DDE
  469.      conversations. For Example:
  470.      
  471.      PAYROLL.EXE /R:TUT
  472.      
  473.      Your application should respond to this switch with the
  474.      REGISTERADDON command.
  475.   
  476.   2. The End User selects your tool from the Menu, and your tool is not
  477.      already running.  WinCheck will then run your application with the
  478.      /L:xxx command line switch. "xxx" is the current account ID, which 
  479.      is used for the topic in DDE conversations.  For Example:
  480.      
  481.      PAYROLL.EXE /R:TUT
  482.      
  483.      Your application need not respond to this switch, it merely should
  484.      use TUT (in this example) for the Topic.
  485.   
  486.   3. The End User selects your tools from the Menu, and it is already 
  487.      running.  WinCheck will then bring your tool to the Top 
  488.      (WinSDK call ShowWindow (hWndApp, SW_SHOW)).
  489.      
  490. WWWDDEC.DLL
  491.   
  492.   WWWDDEC.DLL is a DLL included with WinCheck.  It allows an application
  493.   to become a DDE Client without having to write any DDE code.  The 
  494.   exported function from this DLL is:
  495.   
  496.   WORD FAR PASCAL WWWDDERun ( szCommand, iAction, szReturn, hWnd )
  497.   
  498.   szCommand   LPSTR.  Points to the DDE comand string.
  499.   iAction     int.  Has one of three values:
  500.                
  501.                0: Parse command only (for debugging)
  502.                1: Run the command only
  503.                2: Parse and Run the command (for debugging)
  504.                
  505.   szReturn    LPSTR. Points to an application supplied buffer for 
  506.               DDE_REQUEST return data.
  507.              
  508.   hWnd        HWND. Handle to a top-level window of your application.
  509.   
  510.   The Command Syntax is:
  511.   
  512.   =<c> <App> <topic> <text>
  513.   
  514.   <c>     Can be one of the folowing values:
  515.            
  516.            e    Execute
  517.            r    Request
  518.            p    Poke
  519.   
  520.   <App>   Application Name
  521.   
  522.   <Topic> Application Topic
  523.   
  524.   <Text>  Text of command
  525.   
  526.   
  527.   For example, to do a GetReg from WinCheck, you could call WWWDDERun
  528.   as in the following example:
  529.   
  530.   WWWDDERun ("=r WinCheck TUT GetReg", 1, szReturnData, hWndParent );
  531.   
  532.   This will return the register in the szReturnData memory block.
  533.   
  534.   To register Payroll with WinCheck, it does this:
  535.   
  536.   WWWDDERun (
  537.           "=e WinCheck TUT [RegisterAddOn:"
  538.           "e=\"Payroll.exe\","
  539.           "d=\"Payroll...\","
  540.           "s=\"Make a Payroll Deposit\","
  541.           "c=\"Payroll Deposit\"]",
  542.           1,
  543.           NULL,
  544.           hWndParent );
  545.           
  546. Using Visual Basic to write your tool
  547. =====================================  
  548.  The source code to the Payroll program written in Visual Basic can be
  549.  found on your WinCheck distribution disk. Visual Basic has its own DDE
  550.  commands, so WWWDDERun is not used.
  551.   
  552. Using the Windows SDK to write your tool
  553. ========================================
  554.   
  555.  The source code to the Payroll program written in the Windows SDK 
  556.  and Microsoft C can be found on your WinCheck distribution disk.  
  557.  It makes use of the WWWDDERun command.
  558.   
  559. Distributing your tool to the masses
  560. ====================================
  561.   
  562. Once you have written your tool, there are a number of possibilities:
  563.   
  564.   You can keep it to yourself
  565.   You can sell it as shareware/retail (like WinCheck)
  566.   You can upload it to our Forum on Compuserve for everyone to share
  567.   You can send it to Wilson WindowWare. If it is really cool, we will
  568.    put it in the next release of WinCheck and give you credit for 
  569.    writing it.
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576. Table of Transaction Types:
  577. ---------------------------
  578. Checking Deposit        100
  579. Endstub Check           200
  580. Normal Check            300
  581. Checking ATM            301
  582. Checking MISC           302
  583. Checking Interest       303
  584. Checking Credit/Debit   304
  585. Savings Deposit         320
  586. Savings Withdrawal      321
  587. Savings ATM             322
  588. Savings Misc            323
  589. Savings INterest        324
  590. Savings Credit/Debit    325
  591.